import request from '@/utils/request'
import {getToken} from '@/utils/auth'
var token = getToken()
//员工列表
export function getUserList(screenData,pageData) {
  // let newData = JSON.stringify(screenData)
  return request({
    url: '/user/page/'+pageData.pageNo+'/'+pageData.pageSize,
    method: 'post',
    headers:{'Content-Type':'application/json'},
    data:screenData
  })
}
export function getRList(pageData) {
  return request({
    url: '/role/page/'+pageData.pageNo+'/'+pageData.pageSize,
    method: 'get',
    headers:{'Content-Type':'application/json'},
  })
}
//权限列表
export function getRoleList() {
  return request({
    url: '/role/list',
    method: 'get',
  })
}
//新增
export function getRoleAdd(data) {
    return request({
      url: '/role/add',
      method: 'post',
      data
    })
  }

// 修改
export function getRoleUpdate(data) {
    return request({
      url: '/role/update',
      method: 'post',
      data
    })
  }


// 查看
export function getRoleDetail(id) {
    return request({
      url: '/role/detail/'+id,
      method: 'get',
    })
  }

// 删除
export function getRoleDelete(id) {
    return request({
      url: '/role/delete/'+id,
      method: 'get',
    })
  }